Practical Program Verification by Forward Symbolic Execution: Correctness and Examples
نویسنده
چکیده
We present the theoretical aspects and a prototype implementation in the Theorema system of a method for the verification of recursive imperative programs. The method is based on forward symbolic execution and functional semantics and generates first order verification conditions for the total correctness which use only the underlying theory of the program. All verification conditions are generated automatically by our prototype implementation in the frame of the Theorema system based on Mathematica. The termination property is expressed as an induction principle depending on the structure of the program with respect to recursion. It turns out that part of the verification conditions (notably the termination condition) are crucial for the existence of the function defined by the program, without which the total correctness formula is trivial due to inconsistency of the assumptions. The formal description of the method is the basis for the implementation and also for the proof of its correctness.
منابع مشابه
A Purely Logical Approach to Imperative Program Verification
We present a method for the generation of the verification conditions for the total correctness of imperative programs containing nested loops with abrupt termination statements, and we illustrate it on several examples. The conditions are (first-order) formulae obtained by certain transformations of the program text. The loops are treated similarly to calls of recursively defined functions. Th...
متن کاملHoare Logic with Updates A Hoare-Style Calculus with Explicit State Updates
We present a verification system for a variant of Hoare-logic that supports proving program correctness by forward symbolic execution. No explicit weakening rules are needed and first-order reasoning is automated. The system is suitable for teaching program verification, because the student can concentrate on reasoning about programs following their natural control flow and proofs are machine-c...
متن کاملForward with Hoare
Hoare’s celebrated paper entitled “An Axiomatic Basis for Computer Programming” appeared in 1969, so the Hoare formula P{S}Q is now forty years old! That paper introduced Hoare Logic, which is still the basis for program verification today, but is now mechanised inside sophisticated verification systems. We aim here to give an accessible introduction to methods for proving Hoare formulae based ...
متن کاملProgram Specialization via a Software Verification Tool
Partial evaluation is a program specialization technique that allows to optimize a program for which partial input is known. We propose a new approach to generate specialized programs for a Java-like language via the software verification tool KeY. This is achieved by symbolically executing source programs interleaved with calls to a simple partial evaluator. In a second phase the specialized p...
متن کاملEfficient Directionless Weakest Preconditions (CMU-CyLab-10-002)
Verification condition (VC) generation is a fundamental part of many program analysis and applications, including proving program correctness, automatic test case generation, and proof carrying code. One might imagine VC applications would use the theoretically most appealing VC generation algorithm. This is often not the case. The most theoretically appealing algorithms are based upon weakest ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2008